From f78d79399154605c5eff23ae0f0ee1d627b14b56 Mon Sep 17 00:00:00 2001 From: oliskoli Date: Sun, 17 Aug 2008 21:29:48 +0000 Subject: [PATCH] destinator: Check result of first gbfread. --- destinator.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/destinator.c b/destinator.c index 7ddac676c..ce88a0961 100644 --- a/destinator.c +++ b/destinator.c @@ -340,7 +340,9 @@ destinator_read(void) double d0, d1; char buff[16]; - gbfread(buff, sizeof(buff), 1, fin); + if (! gbfread(buff, 1, sizeof(buff), fin)) + fatal(MYNAME ": Unexpected EOF (end of file)!\n"); + i0 = le_read32(&buff[0]); i1 = le_read32(&buff[4]); -- 2.30.2